package com.maxd.service.helpTask;


import com.maxd.error.Result;
import com.maxd.error.ResultUtil;
import com.maxd.model.HelpTaskDetails;
import com.maxd.respository.helpTask.HelpTaskDetailsJpaRepository;
import com.maxd.respository.helpTask.HelpTaskDetailsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 助力详细信息
 */
@Service
public class HelpTaskDetailsServiceImpl implements HelpTaskDetailsService {

    /** 助力详细信息 */
    @Autowired
    private HelpTaskDetailsJpaRepository helpTaskDetailsJpaRepository;
    /** 助力详细信息自定义方法类 */
    @Autowired
    private HelpTaskDetailsRepository helpTaskDetailsRepository;

    @Override
    public Result saveAll(List<HelpTaskDetails> HelpTaskDetails) {
        helpTaskDetailsJpaRepository.saveAll(HelpTaskDetails);
        return ResultUtil.success();
    }

    @Override
    public List<HelpTaskDetails> selectByHelpTaskId(Long helpTaskId) {
        return helpTaskDetailsRepository.selectByHelpTaskId(helpTaskId);
    }


}
